<h1>Users</h1>
<table>
	<tr>
		<th>ID</th>
		<th>First Name</th>
		<th>Last Name</th>
		<th>E-Mail Address</th>
		<th>Position ID</th>
		<th></th>
	</tr>

	<?php foreach ($users as $user): ?>
	<tr>
		<td><?php echo $user['User']['id']; ?></td>
		<td><?php echo $user['User']['firstName']; ?></td>
		<td><?php echo $user['User']['lastName']; ?></td>
		<td><?php echo $user['User']['email']; ?></td>
		<td><?php echo $user['Position']['name']; ?></td>
		<td>
			<?php echo $html->link('View', '/users/view/'.$user['User']['id']); ?>
			<?php echo $html->link('Edit', '/users/edit/'.$user['User']['id']); ?>
			<?php if ($user['User']['enabled']) { ?>
				<?php echo $html->link('Disable', '/users/disable/'.$user['User']['id']); ?>
			<?php } else { ?>
				<?php echo $html->link('Enable', '/users/enable/'.$user['User']['id']); ?>
			<?php } ?>				
		</td>
	</tr>
	<?php endforeach; ?>

</table>